﻿<Page x:Class="SoftTeach.View.Wochenpläne.MetroTagesplanPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:wochenpläneView="clr-namespace:SoftTeach.View.Wochenpläne"
      xmlns:wochenpläneViewModel="clr-namespace:SoftTeach.ViewModel.Wochenpläne"
      xmlns:softTeach="clr-namespace:SoftTeach"
      mc:Ignorable="d" 
      d:DesignHeight="768" 
      d:DesignWidth="1366"
      Title="Tagesplan"
      DataContext="{Binding Source={x:Static softTeach:App.MainViewModel}, Path=TagesplanWorkspace}"
      FontSize="18">
  <Page.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/SoftTeach;component/Resources/MetroResources.xaml"/>
        <ResourceDictionary >
          <DataTemplate DataType="{x:Type wochenpläneViewModel:TerminplanEintragCollection}">
            <wochenpläneView:MetroTerminplaneinträgeDetailView />
          </DataTemplate>
          <DataTemplate DataType="{x:Type wochenpläneViewModel:GanztagstermineViewModel}">
            <wochenpläneView:GanztagstermineDetailView />
          </DataTemplate>
        </ResourceDictionary>
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </Page.Resources>
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="Auto"/>
      <ColumnDefinition Width="*"/>
      <ColumnDefinition Width="Auto"/>
    </Grid.ColumnDefinitions>
    <Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Background="{StaticResource MetroHeaderBackground}">
      <Label Content="{Binding TagesplanÜberschrift}" Foreground="White" HorizontalAlignment="Center"/>
    </Border>

    <Button Grid.Row="1" Grid.Column="0" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Command="{Binding PreviousDayCommand}">
      <Canvas Height="100" Width="40">
        <Polygon Points="5,50 30,10 30,90" Stroke="Gray">
          <Polygon.Fill>
            <LinearGradientBrush StartPoint="1,0" EndPoint="0,0">
              <GradientBrush.GradientStops>
                <GradientStopCollection>
                  <GradientStop Color="#888888" Offset="0"/>
                  <GradientStop Color="White" Offset="1"/>
                </GradientStopCollection>
              </GradientBrush.GradientStops>
            </LinearGradientBrush>
          </Polygon.Fill>
          <Polygon.Effect>
            <DropShadowEffect ShadowDepth="4" Direction="310" Color="Black" Opacity="0.4"/>
          </Polygon.Effect>
        </Polygon>
      </Canvas>
    </Button>
    <Button Grid.Row="1" Grid.Column="2" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Command="{Binding NextDayCommand}">
      <Canvas Height="100" Width="40">
        <Polygon Points="30,50 5,10 5,90" Stroke="Gray">
          <Polygon.Fill>
            <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
              <GradientBrush.GradientStops>
                <GradientStopCollection>
                  <GradientStop Color="#888888" Offset="0"/>
                  <GradientStop Color="White" Offset="1"/>
                </GradientStopCollection>
              </GradientBrush.GradientStops>
            </LinearGradientBrush>
          </Polygon.Fill>
          <Polygon.Effect>
            <DropShadowEffect ShadowDepth="4" Direction="310" Color="Black" Opacity="0.4"/>
          </Polygon.Effect>
        </Polygon>
      </Canvas>
    </Button>
    <Grid Grid.Row="1" x:Name="PlanGrid" Grid.Column="1" Background="{StaticResource OverlayBackgroundBrush}">
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition MinHeight="40"/>
        <RowDefinition MinHeight="40"/>
        <RowDefinition MinHeight="40"/>
        <RowDefinition MinHeight="40"/>
        <RowDefinition MinHeight="40"/>
        <RowDefinition MinHeight="40"/>
        <RowDefinition MinHeight="40"/>
        <RowDefinition MinHeight="40"/>
        <RowDefinition MinHeight="40"/>
        <RowDefinition MinHeight="40"/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" MinWidth="100"/>
        <ColumnDefinition MinWidth="100"/>
      </Grid.ColumnDefinitions>
      <Border Grid.Row="0" Grid.Column="0">
        <Label>Ganztagstermine</Label>
      </Border>
      <Border Grid.Row="1" Grid.Column="0" Style="{StaticResource TagesplanRowHeaderBorder}">
        <TextBlock>
          <Bold><Run Text="{Binding Path=Wochenplan1Bezeichnung, Mode=OneWay}"></Run></Bold><LineBreak/>
          <Run Text="{Binding Path=Wochenplan1Zeit, Mode=OneWay}"></Run>
        </TextBlock>
      </Border>
      <Border Grid.Row="2" Grid.Column="0" Style="{StaticResource TagesplanRowHeaderBorder}">
        <TextBlock>
          <Bold><Run Text="{Binding Path=Wochenplan2Bezeichnung, Mode=OneWay}"></Run></Bold><LineBreak/>
          <Run Text="{Binding Path=Wochenplan2Zeit, Mode=OneWay}"></Run>
        </TextBlock>
      </Border>
      <Border Grid.Row="3" Grid.Column="0" Style="{StaticResource TagesplanRowHeaderBorder}">
        <TextBlock>
          <Bold><Run Text="{Binding Path=Wochenplan3Bezeichnung, Mode=OneWay}"></Run></Bold><LineBreak/>
          <Run Text="{Binding Path=Wochenplan3Zeit, Mode=OneWay}"></Run>
        </TextBlock>
      </Border>
      <Border Grid.Row="4" Grid.Column="0" Style="{StaticResource TagesplanRowHeaderBorder}">
        <TextBlock>
          <Bold><Run Text="{Binding Path=Wochenplan4Bezeichnung, Mode=OneWay}"></Run></Bold><LineBreak/>
          <Run Text="{Binding Path=Wochenplan4Zeit, Mode=OneWay}"></Run>
        </TextBlock>
      </Border>
      <Border Grid.Row="5" Grid.Column="0" Style="{StaticResource TagesplanRowHeaderBorder}">
        <TextBlock>
          <Bold><Run Text="{Binding Path=Wochenplan5Bezeichnung, Mode=OneWay}"></Run></Bold><LineBreak/>
          <Run Text="{Binding Path=Wochenplan5Zeit, Mode=OneWay}"></Run>
        </TextBlock>
      </Border>
      <Border Grid.Row="6" Grid.Column="0" Style="{StaticResource TagesplanRowHeaderBorder}">
        <TextBlock>
          <Bold><Run Text="{Binding Path=Wochenplan6Bezeichnung, Mode=OneWay}"></Run></Bold><LineBreak/>
          <Run Text="{Binding Path=Wochenplan6Zeit, Mode=OneWay}"></Run>
        </TextBlock>
      </Border>
      <Border Grid.Row="7" Grid.Column="0" Style="{StaticResource TagesplanRowHeaderBorder}">
        <TextBlock>
          <Bold><Run Text="{Binding Path=Wochenplan7Bezeichnung, Mode=OneWay}"></Run></Bold><LineBreak/>
          <Run Text="{Binding Path=Wochenplan7Zeit, Mode=OneWay}"></Run>
        </TextBlock>
      </Border>
      <Border Grid.Row="8" Grid.Column="0" Style="{StaticResource TagesplanRowHeaderBorder}">
        <TextBlock>
          <Bold><Run Text="{Binding Path=Wochenplan8Bezeichnung, Mode=OneWay}"></Run></Bold><LineBreak/>
          <Run Text="{Binding Path=Wochenplan8Zeit, Mode=OneWay}"></Run>
        </TextBlock>
      </Border>
      <Border Grid.Row="9" Grid.Column="0" Style="{StaticResource TagesplanRowHeaderBorder}">
        <TextBlock>
          <Bold><Run Text="{Binding Path=Wochenplan9Bezeichnung, Mode=OneWay}"></Run></Bold><LineBreak/>
          <Run Text="{Binding Path=Wochenplan9Zeit, Mode=OneWay}"></Run>
        </TextBlock>
      </Border>
      <Border Grid.Row="10" Grid.Column="0" Style="{StaticResource TagesplanRowHeaderBorder}">
        <TextBlock>
          <Bold><Run Text="{Binding Path=Wochenplan10Bezeichnung, Mode=OneWay}"></Run></Bold><LineBreak/>
          <Run Text="{Binding Path=Wochenplan10Zeit, Mode=OneWay}"></Run>
        </TextBlock>
      </Border>
      <ContentControl Grid.Row="0" Grid.Column="1" Content="{Binding Path=Ganztagstermine}"/>
      <ContentControl Grid.Row="1" Grid.Column="1" Grid.RowSpan="{Binding Path=Wochenplan1Span}" Content="{Binding Path=Wochenplan1}" ContextMenu="{Binding Path=TerminplanContextMenu}"/>
      <ContentControl Grid.Row="2" Grid.Column="1" Grid.RowSpan="{Binding Path=Wochenplan2Span}" Content="{Binding Path=Wochenplan2}" ContextMenu="{Binding Path=TerminplanContextMenu}"/>
      <ContentControl Grid.Row="3" Grid.Column="1" Grid.RowSpan="{Binding Path=Wochenplan3Span}" Content="{Binding Path=Wochenplan3}" ContextMenu="{Binding Path=TerminplanContextMenu}"/>
      <ContentControl Grid.Row="4" Grid.Column="1" Grid.RowSpan="{Binding Path=Wochenplan4Span}" Content="{Binding Path=Wochenplan4}" ContextMenu="{Binding Path=TerminplanContextMenu}"/>
      <ContentControl Grid.Row="5" Grid.Column="1" Grid.RowSpan="{Binding Path=Wochenplan5Span}" Content="{Binding Path=Wochenplan5}" ContextMenu="{Binding Path=TerminplanContextMenu}"/>
      <ContentControl Grid.Row="6" Grid.Column="1" Grid.RowSpan="{Binding Path=Wochenplan6Span}" Content="{Binding Path=Wochenplan6}" ContextMenu="{Binding Path=TerminplanContextMenu}"/>
      <ContentControl Grid.Row="7" Grid.Column="1" Grid.RowSpan="{Binding Path=Wochenplan7Span}" Content="{Binding Path=Wochenplan7}" ContextMenu="{Binding Path=TerminplanContextMenu}"/>
      <ContentControl Grid.Row="8" Grid.Column="1" Grid.RowSpan="{Binding Path=Wochenplan8Span}" Content="{Binding Path=Wochenplan8}" ContextMenu="{Binding Path=TerminplanContextMenu}"/>
      <ContentControl Grid.Row="9" Grid.Column="1" Grid.RowSpan="{Binding Path=Wochenplan9Span}" Content="{Binding Path=Wochenplan9}" ContextMenu="{Binding Path=TerminplanContextMenu}"/>
      <ContentControl Grid.Row="10" Grid.Column="1" Grid.RowSpan="{Binding Path=Wochenplan10Span}" Content="{Binding Path=Wochenplan10}" ContextMenu="{Binding Path=TerminplanContextMenu}"/>
    </Grid>
  </Grid>
</Page>
